package com.kinghunt.misp.web.controller.samplex;

import com.bygoodtech.kings.common.dto.ApiResult;
import com.bygoodtech.kings.common.dto.page.PageInfo;
import com.kinghunt.misp.common.dto.samplex.LimsSampleDTO;
import com.kinghunt.misp.common.param.samplex.LimsSampleCondition;
import com.kinghunt.misp.common.param.samplex.LimsSampleParam;
import com.kinghunt.misp.common.param.samplex.LimsSampleStockParam;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

/**
 * 样品管理
 *
 * @Author jiangtao
 * @Date 2025年3月7日
 */
@RestController
@RequestMapping("/api/samplex/sample/")
public class SampleController {

    /**
     * 查看样品详情
     *
     * @param sampleId
     * @return
     */
    @GetMapping("get")
    public ApiResult<LimsSampleDTO> getSample(Long sampleId) {

        return ApiResult.ok();
    }

    /**
     * 样品入库（添加样品）
     *
     * @param param
     * @return
     */
    @PostMapping(value = "add", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public ApiResult<Long> addSample(@RequestBody LimsSampleParam param) {

        return ApiResult.ok();
    }

    /**
     * 样品入库
     *
     * @param param
     * @return
     */
    @PostMapping(value = "inStock", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public ApiResult<Void> inStock(@RequestBody LimsSampleStockParam param) {

        return ApiResult.ok();
    }

    /**
     * 样品出库
     *
     * @param param
     * @return
     */
    @PostMapping(value = "outStock", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public ApiResult<Void> outStock(@RequestBody LimsSampleStockParam param) {

        return ApiResult.ok();
    }

    /**
     * 搜索样品
     *
     * @param condition
     * @return
     */
    @GetMapping("search")
    public ApiResult<PageInfo<LimsSampleDTO>> searchSample(LimsSampleCondition condition) {

        return ApiResult.ok();
    }
}
